package com.xgxx.chendawei.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xgxx.chendawei.system.entity.Teacher;
import com.xgxx.chendawei.system.mapper.TeacherMapper;
import com.xgxx.chendawei.system.service.TeacherService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Teacher 后台接口实现类
 */
@Slf4j
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements TeacherService {

    @Autowired
    private TeacherMapper teacherMapper;


    @Override
    public List<Teacher> queryList(Teacher m) {
        QueryWrapper<Teacher> query = new QueryWrapper<>(m);
        return super.list(query);
    }

    @Override
    public List<Teacher> queryListBySql(Teacher m) {
        return teacherMapper.queryListBySql(m);
    }

    @Override
    public Page<Teacher> selectPage(Page<Teacher> page, Teacher o) {
        return teacherMapper.queryPageBySql(o,page);
    }
}
